import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/index.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect: '/tableData',
    children: [
      {
        path: 'query',
        name: 'Query',
        component: () => import('../views/query.vue')
      },
      {
        path: 'tableData',
        name: 'tableData',
        component: () => import('../views/tableData.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
